home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
class
/
linkseq.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-16
|
2KB
|
96 lines
/* Copyright (c) 1993-1996 Algorithms Corporation */
/* All rights reserved. */
/* This file automatically generated by dpp - do not edit */
#define DPP_STRATEGY 2
#define DPP_FASTWIDE 0
#define CLASS LinkSequence_c
#define ivType LinkSequence_iv_t
#include "generics.h"
object LinkSequence_c;
#line 26 "linkseq.c"
typedef struct _LinkSequence_iv_t {
object iNext;
} LinkSequence_iv_t;
#line 20 "linkseq.d"
cmeth objrtn LinkSequence_cm_gNewWithObj(object self, object link)
{
object ls;
ivType *iv;
ChkArgNul(link, 2);
ls = oSuper(LinkSequence_c, gNew, self)(self);
iv = ivPtr(ls);
iv->iNext = link;
return ls;
}
imeth objrtn LinkSequence_im_gNext(object self)
{ LinkSequence_iv_t *iv = GetIVs(LinkSequence, self);
object n;
if (n = iv->iNext) {
iv->iNext = gNext(iv->iNext);
return n;
}
return gDispose(self);
}
#line 57 "linkseq.c"
objrtn LinkSequence_initialize(void)
{
static CRITICALSECTION cs;
static int volatile once = 0;
ENTERCRITICALSECTION(_CI_CS_);
if (!once) {
INITIALIZECRITICALSECTION(cs);
once = 1;
}
LEAVECRITICALSECTION(_CI_CS_);
ENTERCRITICALSECTION(cs);
if (LinkSequence_c) {
LEAVECRITICALSECTION(cs);
return LinkSequence_c;
}
INHIBIT_THREADER;
Sequence_initialize();
if (LinkSequence_c) {
ENABLE_THREADER;
LEAVECRITICALSECTION(cs);
return LinkSequence_c;
}
LinkSequence_c = gNewClass(Class, "LinkSequence", sizeof(LinkSequence_iv_t), 0, Sequence, END);
cMethodFor(LinkSequence, gNewWithObj, LinkSequence_cm_gNewWithObj);
iMethodFor(LinkSequence, gNext, LinkSequence_im_gNext);
ENABLE_THREADER;
LEAVECRITICALSECTION(cs);
return LinkSequence_c;
}